package com.admission.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

import com.admission.listener.AuditableEntity;

@Entity
public class Examinee extends AuditableEntity{
	private String name;		//姓名
	private String gender;		//性别
	private String level;		//运动等级
	private String item;		//运动项目
	private String identity;	//身份证
	private String ticket;		//准考证
	private String birthday;	//出生日期
	private String type;		//科类
	private String politics;	//政治面貌
	private String nation;		//民族
	private String height;		//身高(cm)
	private String weight;		//体重(kg)
	private String email;		//Email
	private String phone;		//联系电话
	private String mark;		//文化课成绩
	private String address;		//联系地址
	private String photoUrl;	//头像保存路径
	private String password;	//登录密码
	private String province;	//生源省份
	private String registerNumber;	//报名编号
	private String testTime;		//测试时间
	private String feature;   //运动特征
	//学业水平测试成绩（一对一关联）
	private Academic academic;
	
	//体育竞赛情况(主要运动经历)（一对多关联）
	private List<Experience> experiences = new ArrayList<Experience>();
	
	//考生简历(从高中阶段写起) (一对多关联)
	private List<Resume> resumes = new ArrayList<Resume>();
	
	//家庭主要成员(一对多关联)
	private List<Family> families = new ArrayList<Family>();
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getItem() {
		return item;
	}
	public void setItem(String item) {
		this.item = item;
	}
	public String getIdentity() {
		return identity;
	}
	public void setIdentity(String identity) {
		this.identity = identity;
	}
	public String getTicket() {
		return ticket;
	}
	public void setTicket(String ticket) {
		this.ticket = ticket;
	}
	public String getBirthday() {
		return birthday;
	}
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getPolitics() {
		return politics;
	}
	public void setPolitics(String politics) {
		this.politics = politics;
	}
	public String getNation() {
		return nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}
	public String getHeight() {
		return height;
	}
	public void setHeight(String height) {
		this.height = height;
	}
	public String getWeight() {
		return weight;
	}
	public void setWeight(String weight) {
		this.weight = weight;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getMark() {
		return mark;
	}
	public void setMark(String mark) {
		this.mark = mark;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhotoUrl() {
		return photoUrl;
	}
	public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}

	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	@OneToMany(cascade={CascadeType.ALL})
	@JoinColumn(name="examinee_id")
	public List<Experience> getExperiences() {
		return experiences;
	}
	public void setExperiences(List<Experience> experiences) {
		this.experiences = experiences;
	}

	@OneToMany(cascade={CascadeType.ALL})
	@JoinColumn(name="examinee_id")
	public List<Resume> getResumes() {
		return resumes;
	}
	public void setResumes(List<Resume> resumes) {
		this.resumes = resumes;
	}
	
	@OneToMany(cascade={CascadeType.ALL})
	@JoinColumn(name="examinee_id")
	public List<Family> getFamilies() {
		return families;
	}
	public void setFamilies(List<Family> families) {
		this.families = families;
	}
	@OneToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="academic_id")
	public Academic getAcademic() {
		return academic;
	}
	public void setAcademic(Academic academic) {
		this.academic = academic;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getRegisterNumber() {
		return registerNumber;
	}
	public void setRegisterNumber(String registerNumber) {
		this.registerNumber = registerNumber;
	}
	public String getTestTime() {
		return testTime;
	}
	public void setTestTime(String testTime) {
		this.testTime = testTime;
	}
	public String getFeature() {
		return feature;
	}
	public void setFeature(String feature) {
		this.feature = feature;
	}
	
}
